package com.dwxt.community.controller;

import com.dwxt.common.base.*;
import com.dwxt.community.entity.*;
import com.dwxt.community.service.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RequestMapping("/cms/community")
@RestController
public class CommunityController {


    @Autowired
    private CommunityService communityService;

    /**
     * showdoc
     *
     * @return {"status":200,"msg":"SUCCESS","data":[{"id":1,"communityName":"聚金万佳苑","createTime":1585133388000},{"id":2,"communityName":"拉开距离况佳","createTime":1586346611000}]}
     * @catalog 社区/社区
     * @title 获取社区列表
     * @description 获取社区列表
     * @url /cms/community/selectList
     */
    @RequestMapping("/selectList")
    public BaseResult selectCommunityList() {
        List<Community> communities = communityService.selectList();
        return BaseResult.ok(communities);
    }


}
